<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="renderer" content="webkit" />
  <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<%# <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> %>
  <link rel="Shortcut Icon" href="/volunteer/images/favicon.ico" type="image/x-icon" />
  <link rel="icon" href="/volunteer/images/favicon.ico" type="image/x-icon" />
  <link rel="shortcut icon" href="/volunteer/images/favicon.ico" type="image/x-icon" />
  <link href="/index/css/main.css" type="text/css" rel="stylesheet" />
  <link href="/index/css/module.css" type="text/css" rel="stylesheet" />
  <link href="/css/select2.min.css" rel="stylesheet">
  <title>首页-果壳社团</title>
  <style>
  #marquee_wrap{
    height: 40px;
    background-color: #2c462b;
    width:985px;
    margin-left:auto;
    margin-right:auto;
}
    li {
      list-style: none;
    }
    .left div{
      display: none;
    }
    .left .hover{
      display: block;
    }
    #nav_box {
      height: 80px;
       /* background-color:#0a3b95  */
    }
    .container .select2 {
      margin-top: 25px;
    }
    #select2_society {
      width: 200px;
    }
    html, body { font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;}
    ul, ol { padding: 0;}
    .banner { position: relative; overflow: auto; text-align: center;}
    .banner li { list-style: none; }
    .banner ul li { float: left; }
    #lunbo { width: 100%;}
    #lunbo .dots { position: absolute; left: 0; right: 0; bottom: 20px;}
    #lunbo .dots li
    {
      display: inline-block;
      width: 10px;
      height: 10px;
      margin: 0 4px;
      text-indent: -999em;
      border: 2px solid #fff;
      border-radius: 6px;
      cursor: pointer;
      opacity: .4;
      -webkit-transition: background .5s, opacity .5s;
      -moz-transition: background .5s, opacity .5s;
      transition: background .5s, opacity .5s;
    }
    #lunbo .dots li.active
    {
      background: #fff;
      opacity: 1;
    }
    .btn-link
    {
      color:black;
    }
    #lunbo .arrow { position: absolute; top: 160px;display: none}
    #lunbo #al { left: 280px;}
    #lunbo #ar { right: 280px;}
    #lunbo ul img{width: 980px;height: 320px;}
  </style>
  <%= yield :css %>
</head>
<body>

  <div id="marquee_wrap">
     <marquee><span class="head_title" style="font-weight: bolder;font-size: 20px;color: white;">欢迎来到果壳社团,快来注册加入感兴趣的社团吧！</span></marquee>
  </div>

<div id="nav_box">
  <div class="wrap">
    <span class="logo">
      <img src="/index/images/lougou.png" style="width:320px;height: 80px;">
    </span>
    <span class="container navbar-right">
      <ul id="nav" style="float:right"  >
        <li><a href="/index/index" class="menu-index">首页</a></li>
        <li><a href="/index/article" class="menu-article">公告通知</a></li>
        <li><a href="/index/activity" class="menu-activity">活动报名</a></li>
        <li><a href="/index/attachment" class="menu-attachment">下载中心</a></li>
        <li><a href="/index/society" class="menu-society">社团简介</a></li>
        
        
        <% if !session[:user] %>
            <li>
                  <a href="/users/signup" style="color:#0000ff;font-weight:250;">
                      <span class="glyphicon glyphicon-log-out" style="color:#0000ff"></span> 注册
                  </a>
              </li>
              <li>
                  <a href="/admin " style="color:#0000ff;font-weight:250">
                      <span class="glyphicon glyphicon-envelop"></span> 登录
                  </a>
              </li>
        <% end %>

        <% if session[:user] %>
            <li>
                  <a href="/admin" style="color:#0000ff;font-weight:250;">
                      <span class="glyphicon glyphicon-log-out" style="color:#0000ff"></span> 个人空间
                  </a>
              </！li>
              <li>
                  <a href="/admin/sessions/destroy " style="color:#0000ff;font-weight:250">
                      <span class="glyphicon glyphicon-envelop"></span> 退出
                  </a>
              </li >
          <% end %>
      </ul>
      <%# <select id="select2_society"></select> %>
    </span>
  </div>
</div>
<%= yield %>
<div id="footer">
  <div class="footer_wrap">
    <div>
      <ul class="footer_contact">
        <li class="footer_contact_one small">联系我们/CONTACT US</li>
        <li class="footer_contact_two">果壳软件工程小组</li>
      </ul>
      <ul class="footer_address">
        <li><span class="footer_contact_three">联系地址：</span><p>中国科学院大学雁栖湖校区学生3公寓431</p></li>
        <li><span class="footer_contact_three">小组成员：</span><p>施哲宇、李航程、严愉程、陈励鹏、王自然</p></li>
      </ul>
      <ul class="footer_feedback">
        <li><span class="footer_contact_three">反馈邮箱：</span><p>705328646@qq.com </p></li>
        <li><span class="footer_span">推荐浏览器：Chrome,Firefox</span></li>
        <li> <span class="footer_span">&copy;2021 designed by 果壳软件工程小组</span></li>
      </ul>
    </div>
  </div>
  <div class="clear"></div>
</div>

</body>
<script src="/js/jquery-1.10.2.min.js"></script>
<script src="/js/select2.min.js"></script>
<script src="/js/my.js"></script>
<%= yield :js %>
<script>
  $(function () {
      // 导航栏默认选中
      $(".<%= @menu_name %>").addClass('active');
      //启动select2
      function societySelect(data) {
          data.unshift('切换社团');
          $("#select2_society").select2({
              data: data
          });
      }
      $('#select2_society').change(function () {
          var id = $(this).val();
          window.location.href = '/index/change/' + id;
      });
      doRequest('','/index/get_societies','GET',{},societySelect);
  });
</script>
</html>
